package com.blackto.lib.eventbus.event;

import lombok.Data;

import java.time.Instant;
import java.util.Date;


@Data
public abstract class IntegrationEvent {
    private Long eventId;
    private Date createdTime;

    public IntegrationEvent(Long eventId) {
        this.eventId = eventId;
        this.createdTime = Date.from(Instant.now());
    }

    public IntegrationEvent(Long eventId, Date createdTime) {
        this.eventId = eventId;
        this.createdTime = createdTime;
    }

    public Long getEventId() {
        return eventId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }
}
